package tushare

import (
	"tushare/model/mysql"
)

type Minute struct {
	Id         int64  `json:"id"`
	TsCode     string `json:"ts_code"`
	MinuteJson string `json:"minute_json"`
	CreateDate string `json:"create_date"`
}

func MinuteCreate(m Minute) {
	mysql.DB.Table("tushare_minute").Create(&m)
}

func MinuteInfo(tsCode, date string) Minute {
	m := Minute{}
	mysql.DB.Table("tushare_minute").Where("ts_code = ? and create_date = ?", tsCode, date).Scan(&m)
	return m
}
